package com.mq.springcloud.entity

import lombok.AllArgsConstructor
import lombok.Data
import lombok.NoArgsConstructor

/**\
 * 返回实体  code：200就是成功！
 * @param <T>
</T> */
@Data
@AllArgsConstructor
@NoArgsConstructor
class CommonResult<T>(i: Int, s: String, result: Int) {  //泛型：如果装的payment 返回payment,装的order 返回order
    
    var code: Int? = null
        set(code) {
            field = this.code
        }
    var message: String? = null
        set(message) {
            field = this.message
        }
    var data: T? = null
        set(data) {
            field = this.data
        }
}

